﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="OneVehicleIndex.aspx.cs" Inherits="VehicleUI_OneVehicleIndex" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
  <link href="../CSS/jquery-ui.css" rel="stylesheet" type="text/css" />
  <script src="../JavaScript/jquery-1.9.1.js" type="text/javascript"></script>
  <script src="../JavaScript/jquery-ui.js" type="text/javascript"></script>
    
    <style type="text/css">
    
	#box{width:98%; height:100%;}
	#tab_nav{margin:0; padding:0; height:25px; line-height:24px;}
	#tab_nav li{float:left; margin:0 3px; list-style:none; border:1px solid #999; border-bottom:none; height:24px; width:60px; text-align:center; background:#FFF;}
	a{font:bold 14px/24px "微软雅黑", Verdana, Arial, Helvetica, sans-serif; color:green; text-decoration:none;}
	a:hover{color:red;}
	#tab_content{width:398px; height:273px; border:1px solid #999; font:bold 4em/273px "微软雅黑", Verdana, Arial, Helvetica, sans-serif; text-align:center; background:#FFF; overflow:hidden;}
	#tabContent{width:100%; height:100%;border:1px solid #999;}
    </style>
    
    
    <script type="text/javascript">
        $(document).ready(function() {

            //车牌号自动下拉
            $("#txt_VehicleID").autocomplete({ source: "../ashx/autocomplete.ashx" });

            //判断是否存在该车
            $("#txt_VehicleID").blur(function() {

                $.get("../ashx/validate.ashx", { ID: $("#txt_VehicleID").val() }, function(data, status) {
                    if (data == "") {
                        alert("不存在该车信息,请重新录入车牌号或车架号!");
                        //alert("数据：" + data + "\n状态：" + status);
                    }
                    else {
                        $("#txt_FrameNO").val(data);
                    }
                });

            });



            $("#btn_Sure").click(function() {
                var _have = true;
                var frameNO = $("#txt_FrameNO").val();

                $.get("../ashx/ValidateFrameNO.ashx", { ID: frameNO }, function(data, status) {
                    if (data == "N") {
                        alert("不存在该车信息,请重新录入车牌号或车架号!");
                        //alert("数据：" + data + "\n状态：" + status);
                        return;
                    }
                    else {
                        //alert("测试成功" + frameNO);
                        $("#tab1").attr("href", "Base/VehicleAMV.aspx?Type=View");
                        $("#tab2").attr("href", "CheckScore/CheckScoreMgr.aspx");
                        $("#tab3").attr("href", "Violation/ViolationMgr.aspx");
                        $("#tab4").attr("href", "Repair/RepairMgr.aspx");
                        $("#tab5").attr("href", "Maintenance/MaintenanceMgr.aspx");
                        $("#tab6").attr("href", "Insurance/InsuranceMgr.aspx");
                        $("#tab7").attr("href", "Kilometre/KilometreMgr.aspx");
                        $("#tab8").attr("href", "GPS/GpsMgr.aspx");
                        $("#tab9").attr("href", "VehicleCase/VehicleCaseMgr.aspx");
                        $("#tab10").attr("href", "Borrow/BorrowMgr.aspx");
                        $("#tab11").attr("href", "Fuel/CashFuelMgr.aspx");
                        $("#tab12").attr("href", "Fuel/CardFuelMgr.aspx");
                        
                        $("#fv").attr("src", "Base/VehicleAMV.aspx?Type=View");
                    }
                });
                
            });

        });

      
  </script>
    
    
</head>
<body style=" margin:0">
    <form id="form1" runat="server">
    <div style=" width:100%; height:100%;">
    <div style=" width:100%; height:8%; float:left; text-align:center;">
                        <asp:Label ID="Label19" runat="server" Text="车牌号" Font-Bold="True"></asp:Label>
                        <asp:TextBox ID="txt_VehicleID" runat="server" Width="107px" ></asp:TextBox>
                    &nbsp;&nbsp;
                        <asp:Label ID="Label1" runat="server" Text="车架号" Font-Bold="True"></asp:Label>
                        <asp:TextBox ID="txt_FrameNO" runat="server" Width="107px" ></asp:TextBox>
                        &nbsp;
              <%-- <asp:Button ID="btn_Sure" runat="server" Text="确定" onclick="btn_Sure_Click" /> --%>
             <input id="btn_Sure" type="button" value="确定" />
         </div>

    <div id="box" style=" float:left; width:100%; height:90%; margin-top:15px;">
      <ul id="tab_nav">
        <li><a id="tab1" href="NoVehicle.htm" target="fv">基本信息</a></li>
        <li><a id="tab2" href="NoVehicle.htm" target="fv">检查评分</a></li>
        <li><a id="tab3" href="NoVehicle.htm" target="fv">违章</a></li>
        <li><a id="tab4" href="NoVehicle.htm" target="fv">维修</a></li>
        <li><a id="tab5" href="NoVehicle.htm" target="fv">保养</a></li>
        <li><a id="tab6" href="NoVehicle.htm" target="fv">保险</a></li>
        <li><a id="tab7" href="NoVehicle.htm" target="fv">公里数</a></li>
        <li><a id="tab8" href="NoVehicle.htm" target="fv">GPS</a></li>
        <li><a id="tab9" href="NoVehicle.htm" target="fv">案件</a></li>
        <li><a id="tab10" href="NoVehicle.htm" target="fv">借出</a></li>
        <li><a id="tab11" href="NoVehicle.htm" target="fv">现金加油</a></li>
        <li><a id="tab12" href="NoVehicle.htm" target="fv">刷卡加油</a></li>

      </ul>
      <div id="tabContent">
        <iframe id="fv" name="fv" width="100%"  height="500px" src="NoVehicle.htm" 
              frameborder="0" scrolling="auto"></iframe>
      </div>
    </div>
    </div>
    </form>
</body>
</html>

